tmf-prepay-balance-management-biz

(0 reviews)

POST AdjustBalance

URL

https://[localhost]:[port]/tmf-api/prepayBalanceManagement/v4/{businessId}/adjustBalance

URL PARAMS

nametypedescriptionrequired
businessIdstring2 letter ISO 3166 country code (TT, BB, JM, PA, etc.) identifying the business unit.Y
namevaluedescriptionrequired
client_idstringPublic identifier to the application o channelY
client_secretstringIs a secret known only to the application and the authorization serverY
X-Correlation-IDstringIdentifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction.Y

Request Body for PA

{
    "adjustType": "credit",
    "reason": "SK2.0",
    "amount": {
        "amount": 2,
        "units": "USD"
    },
    "logicalResource": [
        {
            "id": "65554122"
        }
    ],
    "characteristic": [
        {
            "name": "AdjustmentCode",
            "value": "CP"
        },
        {
            "name": "TotalAmount",
            "value": "3"
        },
        {
            "name": "AmountPaid",
            "value": "0.2"
        },
        {
            "name": "transactionId",
            "value": "344849"
        }
    ],
    "@type": "Adelanta Saldo"
}
Definitions

Skipped properties: id,href,status,requestedDate,confirmationDate,relatedParty,partyAccount

nametypedescriptionrequired
descriptionstringDescription of the recharge operationN
reasonstringText describing the reason for the action/taskN
adjustTypeAdjustTypeValid values are RecurringCharge or OneTimeChargeY
amountQuantityIndicate the amount on the bucketY
amount.amountnumberNumeric value in a given unit
amount.unitsstringUnit of measurement for the numeric value
amount.'@baseType'stringWhen sub-classing, this defines the super-class
amount.'@schemaLocation'stringA URI to a JSON-Schema file that defines additional attributes and relationships
amount.'@type'stringWhen sub-classing, this defines the sub-class entity name
bucketBucketRef []A reference to the bucket impacted by the request or valueY
bucket[].idstringunique identifierY
bucket[].hrefstringHyperlink referenceN
bucket[].namestringName of the related entity.N
bucket[].'@baseType'stringWhen sub-classing, this defines the super-class. Example value: ResourceSpecificationN
bucket[].'@schemaLocation'string (uri)A URI to a JSON-Schema file that defines additional attributes and relationships. Example value: https://mycsp.com:8080/tmf-api/schema/Resource/LogicalResourceSpecification.schema.jsonN
bucket[].'@type'stringWhen sub-classing, this defines the sub-class Extensible name. Example value: LogicalResourceSpecificationN
bucket[].'@referredType'stringThe actual type of the target instance when needed for disambiguation.N
channelChannelRefIndicator for the channel used to request the transferN
channel.idstringUnique identifierY
hrefstringHyperlink referenceN
channel.namestringName of the channelN
channel.'@baseType'stringWhen sub-classing, this defines the super-classN
channel.'@schemaLocation'string (uri)A URI to a JSON-Schema file that defines additional attributes and relationshipsN
channel.'@type'stringWhen sub-classing, this defines the sub-class Extensible nameN
channel.'@referredType'stringThe actual type of the target instance when needed for disambiguationN
logicalResourceLogicalResourceRef []The logical resource related to the operationN
logicalResource[].idstringUnique identifierY
logicalResource[].hrefstringHyperlink referenceN
logicalResource[].namestringName of the related entityN
logicalResource[].'@baseType'stringWhen sub-classing, this defines the super-classN
logicalResource[].'@schemaLocation'string (uri)A URI to a JSON-Schema file that defines additional attributes and relationshipsN
logicalResource[].'@type'stringWhen sub-classing, this defines the sub-class Extensible nameN
logicalResource[].'@referredType'stringThe actual type of the target instance when needed for disambiguationN
productProductRef []The products related to the operationN
product[].idstringUnique identifier of the productY
product[].hrefstringHyperlink reference to the productN
product[].namestringName of the related product entityN
product[].'@baseType'stringDefines the super-class when sub-classingN
product[].'@schemaLocation'stringURI to a JSON-Schema file that defines additional attributes and relationshipsN
product[].'@type'stringDefines the sub-class Extensible name when sub-classingN
product[].'@referredType'stringThe actual type of the target instance when needed for disambiguationN
requestorRelatedPartyIdentifier for the user/customer/entity that performs the top-up actionN
requestor.idstringUnique identifierY
requestor.hrefstringHyperlink referenceN
requestor.namestringName of the related entityN
requestor.rolestringRole played by the related partyN
requestor.'@baseType'stringWhen sub-classing, this defines the super-classN
requestor.'@schemaLocation'stringA URI to a JSON-Schema file that defines additional attributes and relationshipsN
requestor.'@type'stringWhen sub-classing, this defines the sub-class Extensible nameN
requestor.'@referredType'stringThe actual type of the target instance when needed for disambiguationY
usageTypestring/enumValid values for the usage type are [ monetary, voice, data, sms, other ]Y
validForTimePeriodThe period for which the balance in the bucket is validN
validFor.endDateTimestringEnd of the time period, using IETC-RFC-3339 formatNo
validFor.startDateTimestringStart of the time period, using IETC-RFC-3339 format.No
validFor.'@baseType'stringWhen sub-classing, this defines the super-classNo
validFor.'@schemaLocation'stringA URI to a JSON-Schema file that defines additional attributes and relationshipsNo
validFor.'@type'stringWhen sub-classing, this defines the sub-class entity nameNo
'@baseType'stringWhen sub-classing, this defines the super-classN
'@schemaLocation'string (URI)A URI to a JSON-Schema file that defines additional attributes and relationshipsN
'@type'stringWhen sub-classing, this defines the sub-class entity nameN

Response

In this section all the possible data structures received by the client at the moment of responding the method are defined.

Possible response success

This section defines all the possible data structures received by the client and that must be considered satisfactory at the time of responding to the method.

[ 201 ] for PA
{
    "logicalResource": {
        "id": "65554122",
        "@type": "MSISDN",
        "@baseType": "logicalResource"
    },
    "amount": {
        "units": "USD",
        "amount": 2.0
    }
}
Definitions
nametypedescriptionrequired
idstringUnique Identifier for the resourceN
hrefstringA reference to the resourceN
confirmationDatestringDate when the deduction was confirmed in the serverN
descriptionstringDescription of the recharge operationN
reasonstringText describing the reason for the action/taskN
requestedDatestringDate when the deduction request was received in the serverN
adjustTypeAdjustTypeValid values are RecurringCharge or OneTimeChargeY
amountQuantityIndicate the amount on the bucketY
amount.amountnumberNumeric value in a given unit
amount.unitsstringUnit of measurement for the numeric value
amount.'@baseType'stringWhen sub-classing, this defines the super-class
amount.'@schemaLocation'stringA URI to a JSON-Schema file that defines additional attributes and relationships
amount.'@type'stringWhen sub-classing, this defines the sub-class entity name
bucketBucketRef []A reference to the bucket impacted by the request or valueY
bucket[].idstringunique identifierY
bucket[].hrefstringHyperlink referenceN
bucket[].namestringName of the related entity.N
bucket[].'@baseType'stringWhen sub-classing, this defines the super-class. Example value: ResourceSpecificationN
bucket[].'@schemaLocation'string (uri)A URI to a JSON-Schema file that defines additional attributes and relationships. Example value: https://mycsp.com:8080/tmf-api/schema/Resource/LogicalResourceSpecification.schema.jsonN
bucket[].'@type'stringWhen sub-classing, this defines the sub-class Extensible name. Example value: LogicalResourceSpecificationN
bucket[].'@referredType'stringThe actual type of the target instance when needed for disambiguation.N
channelChannelRefIndicator for the channel used to request the transferN
channel.idstringUnique identifierY
hrefstringHyperlink referenceN
channel.namestringName of the channelN
channel.'@baseType'stringWhen sub-classing, this defines the super-classN
channel.'@schemaLocation'string (uri)A URI to a JSON-Schema file that defines additional attributes and relationshipsN
channel.'@type'stringWhen sub-classing, this defines the sub-class Extensible nameN
channel.'@referredType'stringThe actual type of the target instance when needed for disambiguationN
logicalResourceLogicalResourceRef []The logical resource related to the operationN
logicalResource[].idstringUnique identifierY
logicalResource[].hrefstringHyperlink referenceN
logicalResource[].namestringName of the related entityN
logicalResource[].'@baseType'stringWhen sub-classing, this defines the super-classN
logicalResource[].'@schemaLocation'string (uri)A URI to a JSON-Schema file that defines additional attributes and relationshipsN
logicalResource[].'@type'stringWhen sub-classing, this defines the sub-class Extensible nameN
logicalResource[].'@referredType'stringThe actual type of the target instance when needed for disambiguationN
partyAccountPartyAccountRefPartyAccount reference. A party account is an arrangement that a party has with an enterprise that provides products to the party.N
partyAccount.idstringUnique identifier of the party accountY
partyAccount.hrefstringReference of the party accountN
partyAccount.descriptionstringDetailed description of the party accountN
partyAccount.namestringName of the party accountN
partyAccount.statusstringThe condition of the account, such as due, paid, in arrears.N
partyAccount.'@baseType'stringWhen sub-classing, this defines the super-classN
partyAccount.'@schemaLocation'stringA URI to a JSON-Schema file that defines additional attributes and relationshipsN
partyAccount.'@type'stringWhen sub-classing, this defines the sub-class entity nameN
partyAccount.'@referredType'stringThe actual type of the target instance when needed for disambiguation.N
productProductRef []The products related to the operationN
product[].idstringUnique identifier of the productY
product[].hrefstringHyperlink reference to the productN
product[].namestringName of the related product entityN
product[].'@baseType'stringDefines the super-class when sub-classingN
product[].'@schemaLocation'stringURI to a JSON-Schema file that defines additional attributes and relationshipsN
product[].'@type'stringDefines the sub-class Extensible name when sub-classingN
product[].'@referredType'stringThe actual type of the target instance when needed for disambiguationN
relatedPartyRelatedParty []Used to provide information about any other entity with relation to the operationN
RelatedParty[].relatedPartyarrayUsed to provide information about any other entity with relation to the operation. Each element of the array should follow the structure defined in the RelatedParty definition.N
RelatedParty[].requestorobjectIdentifier for the user/customer/entity that performs the top-up action. This can be used to indicate the identifier of an agent that performs the operation on behalf of a user via a customer service channel. Structure including at least attributes role and name. It should follow the structure defined in the RelatedParty definition.N
RelatedParty[].statusstringStatus of the operation. It should follow the structure defined in the ActionStatusType definition.N
RelatedParty[].usageTypestringDefines the type of the underlying balance, such as data, voice, or any currency such as EUR or USD, etc. It should follow the structure defined in the UsageType definition.N
RelatedParty[].validForobjectThe period for which the balance in the bucket is valid. It should follow the structure defined in the TimePeriod definition.N
RelatedParty[].'@baseType'stringWhen sub-classing, this defines the super-class.N
RelatedParty[].'@schemaLocation'stringA URI to a JSON-Schema file that defines additional attributes and relationships.N
RelatedParty[].'@type'stringWhen sub-classing, this defines the sub-class entity name.N
requestorRelatedPartyIdentifier for the user/customer/entity that performs the top-up actionN
requestor.idstringUnique identifierY
requestor.hrefstringHyperlink referenceN
requestor.namestringName of the related entityN
requestor.rolestringRole played by the related partyN
requestor.'@baseType'stringWhen sub-classing, this defines the super-classN
requestor.'@schemaLocation'stringA URI to a JSON-Schema file that defines additional attributes and relationshipsN
requestor.'@type'stringWhen sub-classing, this defines the sub-class Extensible nameN
requestor.'@referredType'stringThe actual type of the target instance when needed for disambiguationY
usageTypestring/enumValid values for the usage type are [ monetary, voice, data, sms, other ]Y
validForTimePeriodThe period for which the balance in the bucket is validN
validFor.endDateTimestringEnd of the time period, using IETC-RFC-3339 formatN
validFor.startDateTimestringStart of the time period, using IETC-RFC-3339 format.N
validFor.'@baseType'stringWhen sub-classing, this defines the super-classN
validFor.'@schemaLocation'stringA URI to a JSON-Schema file that defines additional attributes and relationshipsN
validFor.'@type'stringWhen sub-classing, this defines the sub-class entity nameN
'@baseType'stringWhen sub-classing, this defines the super-classN
'@schemaLocation'string (URI)A URI to a JSON-Schema file that defines additional attributes and relationshipsN
'@type'stringWhen sub-classing, this defines the sub-class entity nameN

Possible response error

In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.

[ 400 ]

Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

{
  "errors" : [{
      "code" : 400,
      "message" : "OCS:ERROR_CODE",
      "description" : "Error description."
    }]
}
[ 404 ]

Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

{
    "errors" : [{
        "code": 404
        "message": "SUBSCRIBER_NOT_FOUND"
        "description": "Subscriber not found"
    }]
}
[ 500 ]

Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.

{
    errors: [{
        code: 500,
        description: "OCS:ERROR",
        message: "Other Error"
    }]
 }
[ 501 ]

Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.

{
  "errors" : [{
      "code" : 501,
      "message" : "Not implemented",
      "description" : "Operation POST /adjustBalance for Business Id: xxxx not implemented"
    }]
  }

Reviews